package cn.android666.recorddemo

import android.Manifest
import android.os.Bundle
import android.widget.Button
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        findViewById<Button>(R.id.startRecord).setOnClickListener { startRecord() }
        findViewById<Button>(R.id.stopRecord).setOnClickListener { stopRecord() }
        registerForActivityResult(ActivityResultContracts.RequestPermission()){
            if (it) {
            }
        }.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE)
    }

    private fun startRecord() {

    }

    private fun stopRecord() {

    }

    override fun onDestroy() {
        super.onDestroy()
    }

}